3.7.78 \(\int (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^3 \, dx\) [678]

Optimal. Leaf size=314 \[ \frac {1}{8} \left (6 a b d \left (4 c^2+d^2\right )+b^2 c \left (4 c^2+9 d^2\right )+4 a^2 \left (2 c^3+3 c d^2\right )\right ) x-\frac {\left (20 a^2 d^2 \left (4 c^2+d^2\right )+30 a b c d \left (c^2+4 d^2\right )-b^2 \left (3 c^4-52 c^2 d^2-16 d^4\right )\right ) \cos (e+f x)}{30 d f}-\frac {\left (100 a^2 c d^2+30 a b d \left (2 c^2+3 d^2\right )-b^2 \left (6 c^3-71 c d^2\right )\right ) \cos (e+f x) \sin (e+f x)}{120 f}-\frac {\left (4 \left (5 a^2+4 b^2\right ) d^2-3 b c (b c-10 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac {b (b c-10 a d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {b^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f} \]

[Out]

1/8*(6*a*b*d*(4*c^2+d^2)+b^2*c*(4*c^2+9*d^2)+4*a^2*(2*c^3+3*c*d^2))*x-1/30*(20*a^2*d^2*(4*c^2+d^2)+30*a*b*c*d*
(c^2+4*d^2)-b^2*(3*c^4-52*c^2*d^2-16*d^4))*cos(f*x+e)/d/f-1/120*(100*a^2*c*d^2+30*a*b*d*(2*c^2+3*d^2)-b^2*(6*c
^3-71*c*d^2))*cos(f*x+e)*sin(f*x+e)/f-1/60*(4*(5*a^2+4*b^2)*d^2-3*b*c*(-10*a*d+b*c))*cos(f*x+e)*(c+d*sin(f*x+e
))^2/d/f+1/20*b*(-10*a*d+b*c)*cos(f*x+e)*(c+d*sin(f*x+e))^3/d/f-1/5*b^2*cos(f*x+e)*(c+d*sin(f*x+e))^4/d/f

________________________________________________________________________________________

Rubi [A]
time = 0.40, antiderivative size = 314, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2870, 2832, 2813} \begin {gather*} -\frac {\left (20 a^2 d^2 \left (4 c^2+d^2\right )+30 a b c d \left (c^2+4 d^2\right )-\left (b^2 \left (3 c^4-52 c^2 d^2-16 d^4\right )\right )\right ) \cos (e+f x)}{30 d f}-\frac {\left (100 a^2 c d^2+30 a b d \left (2 c^2+3 d^2\right )-\left (b^2 \left (6 c^3-71 c d^2\right )\right )\right ) \sin (e+f x) \cos (e+f x)}{120 f}+\frac {1}{8} x \left (4 a^2 \left (2 c^3+3 c d^2\right )+6 a b d \left (4 c^2+d^2\right )+b^2 c \left (4 c^2+9 d^2\right )\right )-\frac {\left (4 d^2 \left (5 a^2+4 b^2\right )-3 b c (b c-10 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac {b (b c-10 a d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {b^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^3,x]

[Out]

((6*a*b*d*(4*c^2 + d^2) + b^2*c*(4*c^2 + 9*d^2) + 4*a^2*(2*c^3 + 3*c*d^2))*x)/8 - ((20*a^2*d^2*(4*c^2 + d^2) +
 30*a*b*c*d*(c^2 + 4*d^2) - b^2*(3*c^4 - 52*c^2*d^2 - 16*d^4))*Cos[e + f*x])/(30*d*f) - ((100*a^2*c*d^2 + 30*a
*b*d*(2*c^2 + 3*d^2) - b^2*(6*c^3 - 71*c*d^2))*Cos[e + f*x]*Sin[e + f*x])/(120*f) - ((4*(5*a^2 + 4*b^2)*d^2 -
3*b*c*(b*c - 10*a*d))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(60*d*f) + (b*(b*c - 10*a*d)*Cos[e + f*x]*(c + d*Si
n[e + f*x])^3)/(20*d*f) - (b^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(5*d*f)

Rule 2813

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(2*a*c +
 b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Cos[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 2832

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d
)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(f*(m + 1))), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Sim
p[b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[
b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2870

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[(
-d^2)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[1/(b*(m + 2)), Int[(a + b*Sin[e + f
*x])^m*Simp[b*(d^2*(m + 1) + c^2*(m + 2)) - d*(a*d - 2*b*c*(m + 2))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c
, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] &&  !LtQ[m, -1]

Rubi steps

\begin {align*} \int (a+b \sin (e+f x))^2 (c+d \sin (e+f x))^3 \, dx &=-\frac {b^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {\int (c+d \sin (e+f x))^3 \left (\left (5 a^2+4 b^2\right ) d-b (b c-10 a d) \sin (e+f x)\right ) \, dx}{5 d}\\ &=\frac {b (b c-10 a d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {b^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {\int (c+d \sin (e+f x))^2 \left (d \left (20 a^2 c+13 b^2 c+30 a b d\right )+\left (4 \left (5 a^2+4 b^2\right ) d^2-3 b c (b c-10 a d)\right ) \sin (e+f x)\right ) \, dx}{20 d}\\ &=-\frac {\left (4 \left (5 a^2+4 b^2\right ) d^2-3 b c (b c-10 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac {b (b c-10 a d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {b^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}+\frac {\int (c+d \sin (e+f x)) \left (d \left (150 a b c d+20 a^2 \left (3 c^2+2 d^2\right )+b^2 \left (33 c^2+32 d^2\right )\right )+\left (100 a^2 c d^2+30 a b d \left (2 c^2+3 d^2\right )-b^2 \left (6 c^3-71 c d^2\right )\right ) \sin (e+f x)\right ) \, dx}{60 d}\\ &=\frac {1}{8} \left (6 a b d \left (4 c^2+d^2\right )+b^2 c \left (4 c^2+9 d^2\right )+4 a^2 \left (2 c^3+3 c d^2\right )\right ) x-\frac {\left (20 a^2 d^2 \left (4 c^2+d^2\right )+30 a b c d \left (c^2+4 d^2\right )-b^2 \left (3 c^4-52 c^2 d^2-16 d^4\right )\right ) \cos (e+f x)}{30 d f}-\frac {\left (100 a^2 c d^2+30 a b d \left (2 c^2+3 d^2\right )-b^2 \left (6 c^3-71 c d^2\right )\right ) \cos (e+f x) \sin (e+f x)}{120 f}-\frac {\left (4 \left (5 a^2+4 b^2\right ) d^2-3 b c (b c-10 a d)\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 d f}+\frac {b (b c-10 a d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 d f}-\frac {b^2 \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 1.46, size = 249, normalized size = 0.79 \begin {gather*} \frac {-60 \left (b^2 d \left (18 c^2+5 d^2\right )+4 a b c \left (4 c^2+9 d^2\right )+6 a^2 \left (4 c^2 d+d^3\right )\right ) \cos (e+f x)+10 d \left (24 a b c d+4 a^2 d^2+b^2 \left (12 c^2+5 d^2\right )\right ) \cos (3 (e+f x))-6 b^2 d^3 \cos (5 (e+f x))+15 \left (4 \left (6 a b d \left (4 c^2+d^2\right )+b^2 c \left (4 c^2+9 d^2\right )+4 a^2 \left (2 c^3+3 c d^2\right )\right ) (e+f x)-8 \left (3 a^2 c d^2+2 a b d \left (3 c^2+d^2\right )+b^2 \left (c^3+3 c d^2\right )\right ) \sin (2 (e+f x))+b d^2 (3 b c+2 a d) \sin (4 (e+f x))\right )}{480 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[e + f*x])^2*(c + d*Sin[e + f*x])^3,x]

[Out]

(-60*(b^2*d*(18*c^2 + 5*d^2) + 4*a*b*c*(4*c^2 + 9*d^2) + 6*a^2*(4*c^2*d + d^3))*Cos[e + f*x] + 10*d*(24*a*b*c*
d + 4*a^2*d^2 + b^2*(12*c^2 + 5*d^2))*Cos[3*(e + f*x)] - 6*b^2*d^3*Cos[5*(e + f*x)] + 15*(4*(6*a*b*d*(4*c^2 +
d^2) + b^2*c*(4*c^2 + 9*d^2) + 4*a^2*(2*c^3 + 3*c*d^2))*(e + f*x) - 8*(3*a^2*c*d^2 + 2*a*b*d*(3*c^2 + d^2) + b
^2*(c^3 + 3*c*d^2))*Sin[2*(e + f*x)] + b*d^2*(3*b*c + 2*a*d)*Sin[4*(e + f*x)]))/(480*f)

________________________________________________________________________________________

Maple [A]
time = 0.43, size = 325, normalized size = 1.04 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x,method=_RETURNVERBOSE)

[Out]

1/f*(a^2*c^3*(f*x+e)-3*a^2*c^2*d*cos(f*x+e)+3*a^2*c*d^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-1/3*a^2*d^3
*(2+sin(f*x+e)^2)*cos(f*x+e)-2*a*b*c^3*cos(f*x+e)+6*a*b*c^2*d*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-2*a*b
*c*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a*b*d^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+b^2
*c^3*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-b^2*c^2*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*b^2*c*d^2*(-1/4*(sin(f
*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*b^2*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e))

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 338, normalized size = 1.08 \begin {gather*} \frac {480 \, {\left (f x + e\right )} a^{2} c^{3} + 120 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2} c^{3} + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a b c^{2} d + 480 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} b^{2} c^{2} d + 360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c d^{2} + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a b c d^{2} + 45 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{2} c d^{2} + 160 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} d^{3} + 30 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a b d^{3} - 32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} b^{2} d^{3} - 960 \, a b c^{3} \cos \left (f x + e\right ) - 1440 \, a^{2} c^{2} d \cos \left (f x + e\right )}{480 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/480*(480*(f*x + e)*a^2*c^3 + 120*(2*f*x + 2*e - sin(2*f*x + 2*e))*b^2*c^3 + 720*(2*f*x + 2*e - sin(2*f*x + 2
*e))*a*b*c^2*d + 480*(cos(f*x + e)^3 - 3*cos(f*x + e))*b^2*c^2*d + 360*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c*
d^2 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*a*b*c*d^2 + 45*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2
*e))*b^2*c*d^2 + 160*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2*d^3 + 30*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(
2*f*x + 2*e))*a*b*d^3 - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*b^2*d^3 - 960*a*b*c^3*cos(
f*x + e) - 1440*a^2*c^2*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 253, normalized size = 0.81 \begin {gather*} -\frac {24 \, b^{2} d^{3} \cos \left (f x + e\right )^{5} - 40 \, {\left (3 \, b^{2} c^{2} d + 6 \, a b c d^{2} + {\left (a^{2} + 2 \, b^{2}\right )} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (24 \, a b c^{2} d + 6 \, a b d^{3} + 4 \, {\left (2 \, a^{2} + b^{2}\right )} c^{3} + 3 \, {\left (4 \, a^{2} + 3 \, b^{2}\right )} c d^{2}\right )} f x + 120 \, {\left (2 \, a b c^{3} + 6 \, a b c d^{2} + 3 \, {\left (a^{2} + b^{2}\right )} c^{2} d + {\left (a^{2} + b^{2}\right )} d^{3}\right )} \cos \left (f x + e\right ) - 15 \, {\left (2 \, {\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} \cos \left (f x + e\right )^{3} - {\left (4 \, b^{2} c^{3} + 24 \, a b c^{2} d + 10 \, a b d^{3} + 3 \, {\left (4 \, a^{2} + 5 \, b^{2}\right )} c d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/120*(24*b^2*d^3*cos(f*x + e)^5 - 40*(3*b^2*c^2*d + 6*a*b*c*d^2 + (a^2 + 2*b^2)*d^3)*cos(f*x + e)^3 - 15*(24
*a*b*c^2*d + 6*a*b*d^3 + 4*(2*a^2 + b^2)*c^3 + 3*(4*a^2 + 3*b^2)*c*d^2)*f*x + 120*(2*a*b*c^3 + 6*a*b*c*d^2 + 3
*(a^2 + b^2)*c^2*d + (a^2 + b^2)*d^3)*cos(f*x + e) - 15*(2*(3*b^2*c*d^2 + 2*a*b*d^3)*cos(f*x + e)^3 - (4*b^2*c
^3 + 24*a*b*c^2*d + 10*a*b*d^3 + 3*(4*a^2 + 5*b^2)*c*d^2)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 729 vs. \(2 (292) = 584\).
time = 0.48, size = 729, normalized size = 2.32 \begin {gather*} \begin {cases} a^{2} c^{3} x - \frac {3 a^{2} c^{2} d \cos {\left (e + f x \right )}}{f} + \frac {3 a^{2} c d^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{2} c d^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {3 a^{2} c d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {a^{2} d^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 a^{2} d^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {2 a b c^{3} \cos {\left (e + f x \right )}}{f} + 3 a b c^{2} d x \sin ^{2}{\left (e + f x \right )} + 3 a b c^{2} d x \cos ^{2}{\left (e + f x \right )} - \frac {3 a b c^{2} d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {6 a b c d^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a b c d^{2} \cos ^{3}{\left (e + f x \right )}}{f} + \frac {3 a b d^{3} x \sin ^{4}{\left (e + f x \right )}}{4} + \frac {3 a b d^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{2} + \frac {3 a b d^{3} x \cos ^{4}{\left (e + f x \right )}}{4} - \frac {5 a b d^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f} - \frac {3 a b d^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{4 f} + \frac {b^{2} c^{3} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} c^{3} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} c^{3} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {3 b^{2} c^{2} d \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {2 b^{2} c^{2} d \cos ^{3}{\left (e + f x \right )}}{f} + \frac {9 b^{2} c d^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {9 b^{2} c d^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {9 b^{2} c d^{2} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {15 b^{2} c d^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {9 b^{2} c d^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {b^{2} d^{3} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 b^{2} d^{3} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {8 b^{2} d^{3} \cos ^{5}{\left (e + f x \right )}}{15 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right )^{2} \left (c + d \sin {\left (e \right )}\right )^{3} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))**2*(c+d*sin(f*x+e))**3,x)

[Out]

Piecewise((a**2*c**3*x - 3*a**2*c**2*d*cos(e + f*x)/f + 3*a**2*c*d**2*x*sin(e + f*x)**2/2 + 3*a**2*c*d**2*x*co
s(e + f*x)**2/2 - 3*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)/(2*f) - a**2*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 2
*a**2*d**3*cos(e + f*x)**3/(3*f) - 2*a*b*c**3*cos(e + f*x)/f + 3*a*b*c**2*d*x*sin(e + f*x)**2 + 3*a*b*c**2*d*x
*cos(e + f*x)**2 - 3*a*b*c**2*d*sin(e + f*x)*cos(e + f*x)/f - 6*a*b*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 4*
a*b*c*d**2*cos(e + f*x)**3/f + 3*a*b*d**3*x*sin(e + f*x)**4/4 + 3*a*b*d**3*x*sin(e + f*x)**2*cos(e + f*x)**2/2
 + 3*a*b*d**3*x*cos(e + f*x)**4/4 - 5*a*b*d**3*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 3*a*b*d**3*sin(e + f*x)*co
s(e + f*x)**3/(4*f) + b**2*c**3*x*sin(e + f*x)**2/2 + b**2*c**3*x*cos(e + f*x)**2/2 - b**2*c**3*sin(e + f*x)*c
os(e + f*x)/(2*f) - 3*b**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 2*b**2*c**2*d*cos(e + f*x)**3/f + 9*b**2*c*
d**2*x*sin(e + f*x)**4/8 + 9*b**2*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 9*b**2*c*d**2*x*cos(e + f*x)**4
/8 - 15*b**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 9*b**2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - b*
*2*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 4*b**2*d**3*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 8*b**2*d**3*cos(e
 + f*x)**5/(15*f), Ne(f, 0)), (x*(a + b*sin(e))**2*(c + d*sin(e))**3, True))

________________________________________________________________________________________

Giac [A]
time = 0.49, size = 274, normalized size = 0.87 \begin {gather*} -\frac {b^{2} d^{3} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {1}{8} \, {\left (8 \, a^{2} c^{3} + 4 \, b^{2} c^{3} + 24 \, a b c^{2} d + 12 \, a^{2} c d^{2} + 9 \, b^{2} c d^{2} + 6 \, a b d^{3}\right )} x + \frac {{\left (12 \, b^{2} c^{2} d + 24 \, a b c d^{2} + 4 \, a^{2} d^{3} + 5 \, b^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (16 \, a b c^{3} + 24 \, a^{2} c^{2} d + 18 \, b^{2} c^{2} d + 36 \, a b c d^{2} + 6 \, a^{2} d^{3} + 5 \, b^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac {{\left (3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {{\left (b^{2} c^{3} + 6 \, a b c^{2} d + 3 \, a^{2} c d^{2} + 3 \, b^{2} c d^{2} + 2 \, a b d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(f*x+e))^2*(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/80*b^2*d^3*cos(5*f*x + 5*e)/f + 1/8*(8*a^2*c^3 + 4*b^2*c^3 + 24*a*b*c^2*d + 12*a^2*c*d^2 + 9*b^2*c*d^2 + 6*
a*b*d^3)*x + 1/48*(12*b^2*c^2*d + 24*a*b*c*d^2 + 4*a^2*d^3 + 5*b^2*d^3)*cos(3*f*x + 3*e)/f - 1/8*(16*a*b*c^3 +
 24*a^2*c^2*d + 18*b^2*c^2*d + 36*a*b*c*d^2 + 6*a^2*d^3 + 5*b^2*d^3)*cos(f*x + e)/f + 1/32*(3*b^2*c*d^2 + 2*a*
b*d^3)*sin(4*f*x + 4*e)/f - 1/4*(b^2*c^3 + 6*a*b*c^2*d + 3*a^2*c*d^2 + 3*b^2*c*d^2 + 2*a*b*d^3)*sin(2*f*x + 2*
e)/f

________________________________________________________________________________________

Mupad [B]
time = 8.44, size = 358, normalized size = 1.14 \begin {gather*} -\frac {90\,a^2\,d^3\,\cos \left (e+f\,x\right )+75\,b^2\,d^3\,\cos \left (e+f\,x\right )-10\,a^2\,d^3\,\cos \left (3\,e+3\,f\,x\right )-\frac {25\,b^2\,d^3\,\cos \left (3\,e+3\,f\,x\right )}{2}+\frac {3\,b^2\,d^3\,\cos \left (5\,e+5\,f\,x\right )}{2}+30\,b^2\,c^3\,\sin \left (2\,e+2\,f\,x\right )-30\,b^2\,c^2\,d\,\cos \left (3\,e+3\,f\,x\right )+90\,a^2\,c\,d^2\,\sin \left (2\,e+2\,f\,x\right )+90\,b^2\,c\,d^2\,\sin \left (2\,e+2\,f\,x\right )-\frac {45\,b^2\,c\,d^2\,\sin \left (4\,e+4\,f\,x\right )}{4}+240\,a\,b\,c^3\,\cos \left (e+f\,x\right )+360\,a^2\,c^2\,d\,\cos \left (e+f\,x\right )+270\,b^2\,c^2\,d\,\cos \left (e+f\,x\right )+60\,a\,b\,d^3\,\sin \left (2\,e+2\,f\,x\right )-\frac {15\,a\,b\,d^3\,\sin \left (4\,e+4\,f\,x\right )}{2}-120\,a^2\,c^3\,f\,x-60\,b^2\,c^3\,f\,x-60\,a\,b\,c\,d^2\,\cos \left (3\,e+3\,f\,x\right )+180\,a\,b\,c^2\,d\,\sin \left (2\,e+2\,f\,x\right )-180\,a^2\,c\,d^2\,f\,x-135\,b^2\,c\,d^2\,f\,x+540\,a\,b\,c\,d^2\,\cos \left (e+f\,x\right )-90\,a\,b\,d^3\,f\,x-360\,a\,b\,c^2\,d\,f\,x}{120\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(e + f*x))^2*(c + d*sin(e + f*x))^3,x)

[Out]

-(90*a^2*d^3*cos(e + f*x) + 75*b^2*d^3*cos(e + f*x) - 10*a^2*d^3*cos(3*e + 3*f*x) - (25*b^2*d^3*cos(3*e + 3*f*
x))/2 + (3*b^2*d^3*cos(5*e + 5*f*x))/2 + 30*b^2*c^3*sin(2*e + 2*f*x) - 30*b^2*c^2*d*cos(3*e + 3*f*x) + 90*a^2*
c*d^2*sin(2*e + 2*f*x) + 90*b^2*c*d^2*sin(2*e + 2*f*x) - (45*b^2*c*d^2*sin(4*e + 4*f*x))/4 + 240*a*b*c^3*cos(e
 + f*x) + 360*a^2*c^2*d*cos(e + f*x) + 270*b^2*c^2*d*cos(e + f*x) + 60*a*b*d^3*sin(2*e + 2*f*x) - (15*a*b*d^3*
sin(4*e + 4*f*x))/2 - 120*a^2*c^3*f*x - 60*b^2*c^3*f*x - 60*a*b*c*d^2*cos(3*e + 3*f*x) + 180*a*b*c^2*d*sin(2*e
 + 2*f*x) - 180*a^2*c*d^2*f*x - 135*b^2*c*d^2*f*x + 540*a*b*c*d^2*cos(e + f*x) - 90*a*b*d^3*f*x - 360*a*b*c^2*
d*f*x)/(120*f)

________________________________________________________________________________________